package day07_collections_map.com.itheima.d6_map_impl;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;

public class MapTest4 {
    public static void main(String[] args) {
        HashMap<String, List<String>> provinces = new HashMap<>();
        ArrayList<String> cities1 = new ArrayList<>();
        Collections.addAll(cities1,"南京","扬州","无锡");
        provinces.put("江苏",cities1);
        List<String> cities2 = new ArrayList<>();
        Collections.addAll(cities2, "武汉市", "襄阳市", "孝感市", "十堰市", "宜昌市");
        provinces.put("湖北省", cities2);

        List<String> cities3 = new ArrayList<>();
        Collections.addAll(cities3, "石家庄市", "唐山市", "邢台市", "保定市", "张家口市");
        provinces.put("河北省", cities3);
        System.out.println("provinces = " + provinces);
        List<String> hbCities = provinces.get("河北省");
        for (String city : hbCities) {
            System.out.println(city);
        }

    }
}
